#!/usr/bin/python3
# -*- coding:utf-8 -*-
""""
@Author: 韩贵芳
@Email: hangf45802@hundsun.com
@Time: 2022/6/20 10:31
@File: test_风险名单维护查询.py
"""

import pytest
from BladeFerm.Lib.Common import logger
from BladeFerm.hui2_app.basic import sys_login, close_brower
from BladeFerm.Lib.data import load_data
from 基础公共脚本.公共方法_hui2 import switch_tab
from 名单管理.风险名单维护查询.风险名单维护_查询 import amlwl_blacklist_serarch
from 名单管理.风险名单维护查询.风险名单维护_名单详情页 import amlwl_blacklist_detail


class TestVerify():
    def setup_class(self):  # 系统登录
        sys_login('admin', '1')
        logger.info('Action setup_class')

    def teardown_class(self):  # 系统退出并关闭浏览器和驱动
        close_brower(flag=False)
        logger.info('Action teardown_class')

    @pytest.mark.parametrize('input_data,ui_expect', load_data('../data/风险名单维护查询/amlwL_blacklist_serach.yaml'))
    def test_amlwl_blacklist(self, input_data, ui_expect):
        amlwl_blacklist_serarch(input_data=input_data, ui_expect=ui_expect)

    @pytest.mark.parametrize('input_data,ui_expect', load_data('../data/风险名单维护查询/amlwl_blacklist_details.yaml'))
    def test_amlwl_blacklist_detail(self, input_data, ui_expect):
        amlwl_blacklist_detail(input_data=input_data, ui_expect=ui_expect)

